package com.ypf.delaycancelorder.entity;


import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

// 订单实体类
public class Order implements Serializable {
    public final static int pay_status_waiting = 0;//待支付
    public final static int pay_status_paid = 1;//已支付
    public final static int pay_status_cancel = 2; // 取消支付

    private String id;

    private String orderNo;

    private Integer status;

    private Boolean isDeleted;

    private Date gmtCreate;

    private Date gmtModified;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Order order = (Order) o;
        return Objects.equals(id, order.id) && Objects.equals(orderNo, order.orderNo) && Objects.equals(status, order.status) && Objects.equals(isDeleted, order.isDeleted) && Objects.equals(gmtCreate, order.gmtCreate) && Objects.equals(gmtModified, order.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, orderNo, status, isDeleted, gmtCreate, gmtModified);
    }

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", orderNo='" + orderNo + '\'' +
                ", status=" + status +
                ", isDeleted=" + isDeleted +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean deleted) {
        isDeleted = deleted;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }
}
